# -*- coding:utf-8 -*-
from fastapi import Request
from core.curd import IBaseService
from app.dao.system import SysOrgDao 
from app.entity.system import SysOrg
from core.curd import CRUDBase


class SysOrgService(IBaseService):

    async def select_all(self):
        return await self.dao.select_all()

    @classmethod
    async def instance(cls, req: Request):
        inst = cls()
        inst.dao = await SysOrgDao.instance(req)
        return inst
